/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package aiaudio.processing.reduce.klsh.kmeaning.base;

import java.util.Arrays;
import org.apache.hadoop.hbase.util.Bytes;

/**
 *
 * @author nastya
 */
public class Data {

    private byte[] key;

    public Data(byte[] key) {
        this.key = key;
    }

    public byte[] getKey() {
        return key;
    }

    public String getKeyString() {
        return Bytes.toString(key);
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Data other = (Data) obj;
        if (!Arrays.equals(this.key, other.key)) {
            return false;
        }
        return true;
    }

}
